#include <allegro.h>
#include <string>

#ifndef _MENUITEM_H
#define	_MENUITEM_H

class MenuItem {
public:
    MenuItem(std::string name, BITMAP *graphic, int xPos, int yPos, void (*callback)(void));
    MenuItem(const MenuItem& orig);
    virtual ~MenuItem();
    void execute();
    BITMAP* getBitmap();
    std::string getText();
    int getXPos();
    int getYPos();
    bool posIsOnItem(int xPos, int yPos);

private:
    std::string mItemName; /* name of the menu item */
    BITMAP * mGraphic; /* pointer to graphic-object which may be displayed instead of text */

    /* Posistions on screen */
    int mXpos; 
    int mYpos;        

    /* Width and height of items.
     These are not static const since we might want to change their values
     during execution. */
    int mWidth;
    int mHeight;
   
    void (*mCallback)(void); /* pointer to a function which is invoked on execute() */
        

};

#endif	/* _MENUITEM_H */

